<?php
/**
 * Created by PhpStorm.
 * User: Lenovo
 * Date: 2018/1/22
 * Time: 14:24
 */

namespace app\admin\model;
use think\model;

class Shop extends Model{

    /**
     * 增加店铺
     */
    public static function shop_add($data=[])
    {

            $data['add_time'] = time();
            if (self::create($data)){
                return true;
            }else{
                return false;
            }
    }
    /**
     * 修改店铺信息
     * @param array
     * @return bool
     */
    public static function edit($data)
    {
        $shop=self::get($data['shops_id'])->toArray();
        $shop['shops_isSelf']=$data['shops_isSelf'];
        $shop['shops_shopKeeper']=$data['shops_shopKeeper'];
        $shop['shops_telephone']=$data['shops_telephone'];
        $shop['shops_shopImg']=$data['shops_shopImg'];
        $shop['shops_shopPhone']=$data['shops_shopPhone'];
        $shop['shops_shopStatus']=$data['shops_shopStatus'];
    }

}